﻿<?php
require_once "common.php";
	//function __autoload($className){
		//require_once("class_".ucfirst($className).".php");
	//}
	$part= new part('','','');
	$partList=$part->showPart();
	//echo count($partList);
?>
<table>
<tr style="background-color:#4682B4;">
	<td align='center' width='100'>栏目编号</td>
	<td align='center' width='150'>栏目标题</td>
	<td align='center' width='80'>顶级栏目</td>
	<td align='center' width='80'>操作</td>
</tr>
<?php
	for($i=0;$i<count($partList)-1;$i++){
		if(fmod($i,2)==0){
			echo "<tr style=\"background-color:#00bfff;\">";
		}else{
			echo "<tr style=\"background-color:#B0E0E6;\">";
		}
		echo "<td align='center'>".$partList[$i][pid]."</td>";
		echo "<td align='center'>".$partList[$i][part]."</td>";
		echo "<td align='center'>".$partList[$i][top]."</td>";
		echo "<td align='center'><a href='./part_edit.php?pid=".$partList[$i][pid]."'>编辑</a>|<a href='./part_del.php?pid=".$partList[$i][pid]."'>删除</a></td>";
		echo "</tr>";
	}

?>
</table>
